<template>
  <a-config-provider :locale="locale">
    <div class="app">
      <component :is="route.meta.layout" v-if="route.meta.layout">
        <router-view />
      </component>
      <router-view v-else />
    </div>
  </a-config-provider>
</template>

<script setup lang="ts">
import { useRoute } from 'vue-router'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'

dayjs.locale('zh-cn')
const locale = zhCN
const route = useRoute()
</script>

<style scoped></style>
